<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.Object.is 判断两个值是否完全相等
        console.log(Object.is(120,120));
        // 和全等号的区别
        console.log(Object.is(NaN,NaN));
        console.log(NaN === NaN);
        
        // 2.Object.assign(被覆盖对象，覆改对象) 对象合并
        const person1 = {
            name:'zs',
            age:12
        }
        const person2 = {
            name:'ls',
            age:13
        }
        console.log(Object.assign(person1,person2));
        // 属性必须两者都有才可覆改

        // 3.Object.setPrototypeOf设置原型
        const school = {
            name:'hstc'
        }
        const scities = {
            xiaoqu:['潮州']
        }
        Object.setPrototypeOf(school,cities)
        console.log(school);
    </script>
</body>
</html>